<template>
  <div>
    <h1>添加</h1>
    名称：<input type="text" v-model="form.name"><br>
    价格：<input type="text" v-model="form.price"><br>
    库存：<input type="text" v-model="form.num"><br>
    <button @click="add">添加</button>
  </div>
  
</template>

<script>
import axios from 'axios';

export default {
  name: "xiaotianjia"
  ,
  data() {
    return {
      form:{},
    }
  },
  methods: {
    add(){
      axios({url:'http://127.0.0.1:5000/addshangpin',method:'post',data:this.form}).then(res=>{
        console.log(res)
      })
    }
  },
  mounted() {
  }
}
</script>

<style scoped>

</style>